gain and gain2 significantly positive (intuitively this should be the case)
t.test(tackle_vals$`ep_tackle_def2-11`,tackle_vals$`ep_tackle_def1-10`,paired = TRUE)
##
## Paired t-test
##
## data: tackle_vals$`ep_tackle_def2-11` and tackle_vals$`ep_tackle_def1-10`
## t = 56.071, df = 11899, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.1535784 0.1647051
## sample estimates:
## mean difference
## 0.1591417
t.test(tackle_vals$`ep_tackle_def2-11`,tackle_vals$ep_tackle_real_eop,paired = TRUE)
##
## Paired t-test
##
## data: tackle_vals$`ep_tackle_def2-11` and tackle_vals$ep_tackle_real_eop
## t = 43.242, df = 11899, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## 0.2298843 0.2517152
## sample estimates:
## mean difference
## 0.2407998
I thought they should be quite similar…
yardline_diff <- tackle_info_real2$tackle_yardline-tackle_info_real2$true_yardline
summary(yardline_diff)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -65.7300 0.1700 0.8900 0.7667 1.8400 22.2800
## playDescription
## 1 (5:44) A.Kamara right tackle to NO 43 for -2 yards (F.Luvu). FUMBLES (F.Luvu), touched at NO 42, RECOVERED by CAR-M.Haynes at NO 44. M.Haynes for 44 yards, TOUCHDOWN. Penalty on NO-N.Vannett, Offensive Holding, declined.
## playResult
## 1 -45
## gameplayId gameId playId ep_tackle_def2-11 ep_tackle_def1-10 info
## 1 2.022093e+12 2022092500 586 1.229106 1.148409 1
## gain ep_tackle_real_eop info2 gain2 tackler_id
## 1 0.08069697 -3.02037 1 4.249477 46527
## playDescription
## 1 (8:46) (No Huddle) B.Mayfield pass short right to C.McCaffrey to CLV 44 for 16 yards (J.Owusu-Koramoah; A.Walker). PENALTY on CAR-I.Thomas, Offensive Holding, 10 yards, enforced at CAR 40 - No Play.
## playResult
## 1 -10
## gameplayId gameId playId ep_tackle_def2-11 ep_tackle_def1-10 info
## 1 2.022091e+12 2022091101 382 3.718465 3.663036 1
## gain ep_tackle_real_eop info2 gain2 tackler_id
## 1 0.05542925 0.01406716 1 3.704398 53481
## playDescription
## 1 (10:13) J.Burrow pass deep right to T.Higgins to NYJ 30 for 45 yards (A.Gardner; L.Joyner). CIN-T.Higgins was injured during the play. PENALTY on NYJ-L.Joyner, Unnecessary Roughness, 15 yards, enforced at NYJ 30.
## prePenaltyPlayResult playResult
## 1 45 60
## gameplayId gameId playId ep_tackle_def2-11 ep_tackle_def1-10 info
## 1 2.022093e+13 2022092506 1332 4.450232 3.572909 1
## gain ep_tackle_real_eop info2 gain2 tackler_id
## 1 0.8773236 4.71303 0 -0.2627981 54469
This may help
Still a lot of negative yardline differences: First inspections show that most of them are due to fumbles with recoveries of the defense (here EP model is wrong and thus gain 2 not accurate)
More problematic: positive yardline difference! Not yet sure what happens here (example play: uId == “2022091809_369”, see also weird looking play2 below)
## gameplayId gameId playId ep_tackle_def2-11 ep_tackle_def1-10 info
## 1 2.022092e+12 2022091807 191 2.4326188 3.489111 0
## 2 2.022092e+12 2022091900 256 4.9833360 6.304934 0
## 3 2.022092e+13 2022091804 2905 -0.1137594 6.092776 0
## 4 2.022101e+13 2022100901 3263 2.7149887 6.135961 0
## gain ep_tackle_real_eop info2 gain2 tackler_id
## 1 -1.056493 3.8399481 0 -1.407329358 43298
## 2 -1.321598 4.8127037 1 0.170632302 54500
## 3 -6.206535 -0.1182011 1 0.004441726 41257
## 4 -3.420972 2.6689868 1 0.046001818 52647
Something goes wrong when predicting “real” tackle frame?
## gameplayId gameId playId ep_tackle_def1-10 avg_yg uId
## 1 2.022092e+12 2022091807 191 3.489111 6.877017 2022091807_191
## 2 2.022092e+12 2022091900 256 6.304934 NaN 2022091900_256
## 3 2.022092e+13 2022091804 2905 6.092776 NaN 2022091804_2905
## 4 2.022101e+13 2022100901 3263 6.135961 NaN 2022100901_3263
## tackle_yardline yardline_pred yardline_100 playResult true_yardline
## 1 38.43 31.55298 41 10 31
## 2 22.33 NaN 31 8 23
## 3 85.51 NaN 90 5 85
## 4 41.99 NaN 54 12 42
## yardline_diff
## 1 7.43
## 2 -0.67
## 3 0.51
## 4 -0.01
No Problem when predicting hypothetical tackle frame:
## gameplayId gameId playId ep_tackle_def2-11 avg_yg uId
## 1 2.022092e+12 2022091807 191 2.4326188 6.1629147 2022091807_191
## 2 2.022092e+12 2022091900 256 4.9833360 2.3485747 2022091900_256
## 3 2.022092e+13 2022091804 2905 -0.1137594 0.4535530 2022091804_2905
## 4 2.022101e+13 2022100901 3263 2.7149887 0.5416715 2022100901_3263
## tackle_yardline yardline_pred yardline_100 playResult true_yardline
## 1 38.43 32.26709 41 10 31
## 2 22.33 19.98143 31 8 23
## 3 85.51 85.05645 90 5 85
## 4 41.99 41.44833 54 12 42
## yardline_diff
## 1 7.43
## 2 -0.67
## 3 0.51
## 4 -0.01
Plot description:
Tackle at yardline around 38 but EOP yardline and (avg) predicted EOP at around 31?
What is happening here? Tackle at yardline 80, EOP yardline at 64, prediction with real frame 63.89, prediction with hypothetical frame 70.89???
Welche Plot Variante bevorzugt ihr? :-)
Anmerkung: ein paar Kleinigkeiten (e.g. Beschriftung) muss noch angepasst werden.